﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Framework.Kit;
using System.Collections;
using BLL.Service;
using BLL.Model;
using System.Data;

namespace BLL.Action
{
    /// <summary>
    /// 拍卖会,更新拍卖会信息、相关标的信息和标的商品信息
    /// </summary>
    public class auction
    {
        // 返回今日拍卖会列表
        public DataTable getTodayAuctionLst()
        {
            auctionService auctionS = new auctionService();
            //今日时间
            String sToday = DateTime.Now.ToShortDateString();
            //开启状态
            String auctionStatus = "AUCTION_STATUS01";
            return auctionS.getAuctionLst(sToday, auctionStatus);
        }

        //根据拍卖会编号获取拍卖会信息
        public auctionModel getAuction(string auctionNo)
        {
            auctionService auctionS = new auctionService();
            auctionModel auctionM = auctionS.getAuction(auctionNo);
            if (auctionM != null)
            {              
                return auctionM;
            }
            return null;
        }

        // 根据拍卖会编号，读取该拍卖会下得标的信息列表
        public DataTable GetTargetLst(string auctionNo)
        {
            targetService targetS = new targetService();
            return targetS.GetTargetList(auctionNo);
        }
    }
}
